﻿<Window x:Class="ConvertImage.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="320" Width="525" SizeToContent="WidthAndHeight" >
    <Grid>
        <StackPanel  Margin="10" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
            <StackPanel.Resources>
                <Style TargetType="Grid"  >
                    <Style.Setters >
                        <Setter Property="Margin" Value="0,10,0,0" />
                        <Setter Property="VerticalAlignment" Value="Stretch" />
                    </Style.Setters>
                </Style>

                <Style TargetType="TextBlock"  >
                    <Style.Setters >
                        <Setter Property="Grid.Column" Value="0" />
                        <Setter Property="HorizontalAlignment" Value="Right" />
                        <Setter Property="Margin" Value="10,0,3,0" />
                        <Setter Property="VerticalAlignment" Value="Stretch" />
                    </Style.Setters>
                </Style>

                <Style TargetType="ComboBox"  >
                    <Style.Setters >
                        <Setter Property="Grid.Column" Value="1" />
                        <Setter Property="HorizontalAlignment" Value="Stretch" />
                        <Setter Property="Margin" Value="10,0,10,0" />
                        <Setter Property="VerticalAlignment" Value="Stretch" />
                    </Style.Setters>
                </Style>

                <Style TargetType="TextBox"  >
                    <Style.Setters >
                        <Setter Property="Grid.Column" Value="1" />
                        <Setter Property="HorizontalAlignment" Value="Stretch" />
                        <Setter Property="Margin" Value="10,0,10,0" />
                        <Setter Property="VerticalAlignment" Value="Bottom" />
                        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
                        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
                    </Style.Setters>
                </Style>

            </StackPanel.Resources>

            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition  Width="160"/>
                    <ColumnDefinition  Width="200*"/>
                </Grid.ColumnDefinitions>
                <Button  Content="Source Image:"  VerticalAlignment="Top" Height="40"  Margin="10,10,10,10" x:Name="btnSourceImages" Click="btnSourceImages_Click" />
                <ListView Name="lvImages" Grid.Column="1" Margin="10,10,10,10" MaxHeight="100" MinWidth="300" MaxWidth="500" MinHeight="100"/>
            </Grid>

            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition  Width="160"/>
                    <ColumnDefinition  Width="200*"/>
                </Grid.ColumnDefinitions>
                <TextBlock  Text="Image Width(px):" />
                <ComboBox IsEditable="True" x:Name="cbWidth">
                    <ComboBoxItem Content="Keep Width" IsSelected="True" Tag="0"/>
                </ComboBox>
            </Grid>

            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition  Width="160"/>
                    <ColumnDefinition  Width="200*"/>
                </Grid.ColumnDefinitions>
                <TextBlock  Text="Image Height(px):" />
                <ComboBox IsEditable="True" Name="cbHeight" Text="Double" IsSelected="True">
                    <ComboBoxItem Content="Keep Height"  IsSelected="True" Tag="0"/>
                </ComboBox>
            </Grid>

            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition  Width="160"/>
                    <ColumnDefinition  Width="200*"/>
                </Grid.ColumnDefinitions>
                <TextBlock  Text="Image Format:" />
                <ComboBox IsEditable="True" Name="cbFormat"  IsSelected="True">
                    <ComboBoxItem Content="JPG" IsSelected="True"   Tag="0"/>
                    <ComboBoxItem Content="PNG"  Tag="0"/>
                </ComboBox>
            </Grid>


            <Button Content="Go" Height="42" HorizontalAlignment="Center" Margin="10,10,10,0" Name="btnGo" VerticalAlignment="Top" Width="169" Click="btnGo_Click" />
        </StackPanel>

    </Grid>
</Window>
